Skip to content

Conversation

@CySSoO
Copy link
Contributor

@CySSoO CySSoO commented Jan 15, 2026

Motivation

  • Provide a 100% Prettyblocks-compatible MegaMenu composed of multiple blocks (parent + children) so nested repeaters/items are not used and the hierarchy is managed by parent ID relations.

Description

  • Introduces four new Prettyblocks block types and templates: megamenu_item, megamenu_column, megamenu_item_link, and megamenu_item_image and allowlists their templates (views/templates/hook/prettyblocks/prettyblock_megamenu_*.tpl).
  • Adds block definitions and configuration fields for the new blocks inside src/Service/EverblockPrettyBlocks.php and registers the templates for rendering in the Prettyblocks UI.
  • Implements server-side assembly logic in everblock.php via hookBeforeRenderingEverblockMegamenuItem, plus helpers (getPrettyblocksByCode, getPrettyblocksChoicesByCode, normalizePrettyblocksRelationId, normalizePrettyblocksLink, sortPrettyblocksByOrder) to collect/filter/normalize child blocks by parent ID and order them for the parent template.
  • Registers a new before-rendering hook (beforeRenderingEverblockMegamenuItem) so the parent block can receive assembled columns via $block.extra, and updates the module hook registration and the EverblockPrettyBlocks::BEFORE_RENDERING_HOOKS list.

Testing

  • No automated tests were executed for this change in the rollout; files were created and committed locally and the code was added to the module (commit message: Add Prettyblocks mega menu block set).

Codex Task

@CySSoO CySSoO merged commit 1cbf2c9 into master Jan 15, 2026
2 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants